home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
varia
/
rpc.lha
/
dynload
/
loadtest.cxx
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-08
|
984b
|
43 lines
// Copyright (C) 1990 by Glenn Gribble; all rights are reserved.
// This program may be used for any purposes including inclusion in
// for profit programs. If the source is copied, the copyright notice
// must be included. Please send bug fixes/reports to glenn@synaptics.com
// This program is distributed without any warranty.
// A simple test program for the loader
#include <stdio.h>
#include <strings.h>
#include "loader.h"
#include "loaderTest.h"
void mainProc(const char *msg)
{
fprintf(stderr,"mainProc: %s\n", msg);
}
testProc procA = mainProc;
main(int argc, char **argv)
{
setArg0(argv[0]);
if (argc > 1) {
if (strcmp(argv[1], "-debug") == 0) {
d_all = 1;
}
if (strcmp(argv[1], "-quiet") == 0) {
d_all = d_relocation = d_execs = d_ctors = d_relocation = d_symbols = 0;
}
}
(*procA)("startup");
if (!loadFile("sub.o")) {
fprintf(stderr,"Could not load subroutine file\n");
exit(1);
}
(*procA)("finish");
}